home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / More Source / C⁄C++ / Xconq 7.0d37 / source / kernel / player.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-03-09  |  1.4 KB  |  38 lines  |  [TEXT/KAHL]

  1. /* Definitions for players in Xconq.
  2.    Copyright (C) 1992, 1993, 1994 Stanley T. Shebs.
  3.  
  4. Xconq is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 2, or (at your option)
  7. any later version.  See the file COPYING.  */
  8.  
  9. typedef struct a_player {
  10.     short id;                 /* unique id for the player */
  11.     char *name;               /* proper name of the player */
  12.     char *configname;         /* name of a particular configuration */
  13.     char *displayname;        /* name of the desired display */
  14.     char *aitypename;         /* name of an AI type */
  15.     short advantage;          /* player's desired initial advantage */
  16.     char *password;           /* encrypted password of the player */
  17.     struct a_side *side;      /* the side being played */
  18.     struct a_player *next;    /* pointer to the next player */
  19. } Player;
  20.  
  21. /* This is the mapping between players and sides. */
  22.  
  23. typedef struct {
  24.     struct a_side *side;      /* the side */
  25.     struct a_player *player;  /* the player assigned to the side */
  26.     int locked;               /* true if the assignment can't be changed */
  27. } Assign;
  28.  
  29. extern Player *playerlist;
  30. extern Player *last_player;
  31.  
  32. extern Assign *assignments;
  33.  
  34. Player *add_player();
  35. Player *add_default_player();
  36. Player *find_player();
  37. char *player_desig();
  38.